package architect.design.patterns.structural.decorator;

/**
 * 具体装饰类
 *
 * @author guanxin
 * @date 2018/5/5 16:04
 */

public class NameCardDecorator extends Decorator {

    protected NameCardDecorator(BakeryComponent baseComponent) {
        super(baseComponent);
        this.name = "Name Card";
        this.price = 4.0;
    }

    public String getName() {
        return super.getName() +
                "(Please Collect your discount card for " +
                this.price +
                ")";
    }
}
